package com.zygh.lz.entity.role;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


@Data
public class SysRole {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date created;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "修改时间")
    private Date updated;

    @ApiModelProperty(value = "状态 0：禁用  1：启用")
    private Integer statu;

    @ApiModelProperty(value = "角色名称")
    @NotBlank(message = "角色名称不能为空")
    private String name;

    @ApiModelProperty(value = "标识  1：PC角色   2：APP角色")
    private Integer signboard;


    @ApiModelProperty(value = "角色编码")
    @TableField("`code`")
    private String code;


    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "部门id")
    private Integer sectionId;

    @TableField(exist = false)
    private List<Long> menuIds = new ArrayList<>();

}
